﻿@model Stardust.Models.OrdenCompras
        
<h2>Pago a Proveedor al Credito</h2>
<p></p><p></p><p></p>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validationEngine-en.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validationEngine.js")" type="text/javascript"></script>



 @using (Html.BeginForm("PagarCredito", "Proveedor", FormMethod.Post, new { @class = "form", id = "validate" }))
{
    
        <table cellpadding = "0" cellspacing = "0" width = "100%" class = "sTable" >

    <thead>
        <tr>
            <td>Producto</td>
           <td>Cantidad</td>
           <td>Precio</td>
           
        </tr>
    </thead>

    <tbody>

    @Html.HiddenFor(model => model.id) 
  
    @for (int i = 0; (i < Model.listaOCDetalle.Count); i++)
    {
             <tr>       
               
                <td> @Html.TextBoxFor(model => model.listaOCDetalle[i].nombre, new { @readonly = "readonly" }) </td>
                <td> @Html.TextBoxFor(model => model.listaOCDetalle[i].cantidad, new { @readonly = "readonly" }) </td>
                <td> @Html.TextBoxFor(model => model.listaOCDetalle[i].precio, new { @readonly = "readonly" }) </td>
                
            </tr>

    
    }

    @Html.HiddenFor(model => model.estado)
         
    <tr>
        <td></td>
        <td>Total Sin IGV</td>
        <td>@Html.TextBoxFor(model => model.subtotal, new { @readonly = "readonly" })</td>
     
    </tr> 

    <tr>
        <td></td>
        <td>IGV</td>
        <td>@Html.TextBoxFor(model => model.igv, new { @readonly = "readonly" })</td>
        
    </tr>
    
    <tr>
        <td></td>
        <td>Total</td>
        <td>@Html.TextBoxFor(model => model.total, new { @readonly = "readonly" })</td>
        
    </tr>

    </tbody>

    </table>

    <p></p>

    <fieldset>

    <div class="formRow">
                @Html.LabelFor(model => model.interes)<span class="req">*</span>
                <div class = "formRight" >@Html.TextBoxFor(model => model.interes, new { @class = "validate[required,custom[onlyNumberSp]]", name = "numsValid", maxlength = "2", placeholder = "Solo numeros" })</div>
                <div class = "formRight">@ViewBag.error</div>
                <div class = "clear" ></div>
    </div>

    <div class="formRow">
                @Html.LabelFor(model => model.numCuotas)<span class="req">*</span>
                <div class = "formRight" >@Html.TextBoxFor(model => model.numCuotas, new { @class = "validate[required,custom[onlyNumberSp]]", name = "numsValid", maxlength = "2", placeholder = "Solo numeros" })</div>
                <div class = "formRight">@ViewBag.error2</div>
                <div class = "clear" ></div>
    </div>

    <div class="formRow">
                @Html.LabelFor(model => model.paga)
                <div class = "formRight" >@Html.TextBoxFor(model => model.paga, new { @readonly = "readonly" })</div>
                
                <div class = "formRight">@ViewBag.error2</div>
                <div class = "clear" ></div>
    </div>

    <div class="formRow">
                @Html.LabelFor(model => model.pagar)
                <div class = "formRight" >@Html.TextBoxFor(model => model.pagar, new { @readonly = "readonly" })</div>
                                
                <div class = "clear" ></div>
    </div>

    <div class="formRow">
                @Html.LabelFor(model => model.pagado)<span class="req">*</span>
                <div class = "formRight" >@Html.TextBoxFor(model => model.pagado, new { @class = "validate[required,custom[onlyNumberSp]]", name = "numsValid", maxlength = "8", placeholder = "Solo numeros" })</div>
                <div class = "formRight">@ViewBag.error3</div>
                <div class = "clear" ></div>
    </div>

    </fieldset>
    
    <p></p><p></p><p></p>
    <p>
        <input type="submit" value="Credito" class = "redB" /> |        
        @Html.ActionLink("Regresar", "PagoProveedor","Proveedor")
    </p>
}

